/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package ac.za.cput.designpatterns.creational.singleton.app;

import ac.za.cput.designpatterns.creational.factoryMethodPattern.model.Animal;
import ac.za.cput.designpatterns.creational.factoryMethodPattern.model.Cat;
import ac.za.cput.designpatterns.creational.factoryMethodPattern.model.Dog;

/**
 *
 * @author user
 */
public class AnimalFactory {
    public Animal getAnimal(String type){
        
        if("canine".equals(type)){
            return new Dog();
        }
        else
        {
            return new Cat();
        }
    }
    
}
